<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script>
  var obj = {
     id:1,
    name: '小米',
    prive: 2222
  }
  console.log(Object.keys(obj))
  console.log(Object.values(obj))
  //修改对象方法
  Object.defineProperty(obj,'num',{
    value:999,
    writable: false,
    //默认为false,是后来修改的是不能被遍历出来的
    enumerable: true,
    //属性是否允许删除,ture 语序,false不允许
    configurable: false
  })
  console.log(obj)
  delete obj.num
  console.log(obj)
</script>

</body>
</html>